<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div class="hhm_div" onclick="test3()">
        <button onclick="test4()">测试冒泡的事件</button>
        <button onclick="test5(event)">测试冒泡的事件，阻止冒泡</button>
    </div>
    
</body>

<script type="text/javascript">
    function test3() {
        console.log("点击了3#")
    }
    function test4() {
        console.log("点击了4#")
    }
    function test5(e) {
        console.log("点击了5#")
        e.stopPropagation(); //阻止冒泡
    }
</script>

</html>

<style>
    * {
        margin-top: 10px;
    }
    .hhm_div{
        background-color: aquamarine;
    }
</style>